class_name 天谕 extends Big

var is_smelling = false
var smell_to_player = null
var is_looking = false

func evolve(old:Big):
	super.evolve(old)
	evolution = "天谕"

func stateUpdate(data:Dictionary):
	is_smelling = data.is_smelling
	if is_smelling:
		smell_to_player = ObjectManager.gameManager.map_players.get(data.username)
	is_looking = data.is_looking
	if player.is_me:
		if (smell_to_player != null):
			smell_to_player.is_beSmelling = is_smelling
		player.is_looking = is_looking

func dieBefore():
	if (is_smelling && smell_to_player != null):
		smell_to_player.is_beSmelling = false
	player.is_looking = false
